﻿using System;
using System.Composition;

namespace GaleSong
{
    public interface IPageMetaData
    {
        int PageIndex { get; }
        string PageName { get; }
    }

    [MetadataAttribute]
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public class PageAttribute : ExportAttribute, IPageMetaData
    {
        public PageAttribute() : base(typeof(IPage))
        {
        }

        public PageAttribute(Type contractType) : base(contractType)
        {
        }

        #region IToolBarPartMetaData Members

        public int PageIndex { get; set; }
        public string PageName { get; set; }

        #endregion
    }

    [MetadataAttribute]
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public class WizardPageAttribute : ExportAttribute, IPageMetaData
    {
        public WizardPageAttribute() : base(typeof(IWizardPage))
        {
        }

        public WizardPageAttribute(Type contractType) : base(contractType)
        {
        }

        #region IToolBarPartMetaData Members

        public int PageIndex { get; set; }
        public string PageName { get; set; }

        #endregion
    }
}